import http from "@/utils/http";
import { AxiosRequestConfig } from "axios";

export interface GetComparisonEnum_ {
  /**
   * @description type
   */
  type: string;
}
export interface GetMetricsByType_ {
  /**
   * @description 原子指标 - atomic; 派生指标 - derived
   */
  type: string;
}
export interface GetMetricsReviewStatusByType_ {
  /**
   * @description 原子指标 - atomic; 派生指标 - derived
   */
  type: string;
}

export class EnumBao {
  /**
   * 获取表达式枚举
   *
   * @tags 枚举controller
   * @request GET: /enum/comparison-enum
   * @secure
   */
  getComparisonEnum = (query: { type: string } | GetComparisonEnum_, params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListOptionVO>({
      url: `/enum/comparison-enum`,
      method: "GET",
      params: query,
      ...params,
    });

  /**
   * 获取需求优先级枚举
   *
   * @tags 枚举controller
   * @request GET: /enum/demand-level-enum
   * @secure
   */
  getDemandLevelEnum = (params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListDemandEnumDTO>({
      url: `/enum/demand-level-enum`,
      method: "GET",
      ...params,
    });

  /**
   * 获取需求状态枚举
   *
   * @tags 枚举controller
   * @request GET: /enum/demand-status-enum
   * @secure
   */
  getDemandStatusEnum = (params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListDemandEnumDTO>({
      url: `/enum/demand-status-enum`,
      method: "GET",
      ...params,
    });

  /**
   * 获取需求类型枚举
   *
   * @tags 枚举controller
   * @request GET: /enum/demand-type-enum
   * @secure
   */
  getDemandTypeEnum = (params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListDemandEnumDTO>({
      url: `/enum/demand-type-enum`,
      method: "GET",
      ...params,
    });

  /**
   * 维度类别
   *
   * @tags 枚举controller
   * @request GET: /enum/dimension-class
   * @secure
   */
  getDimensionClass = (params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListOptionVO>({
      url: `/enum/dimension-class`,
      method: "GET",
      ...params,
    });

  /**
   * 维度类型
   *
   * @tags 枚举controller
   * @request GET: /enum/dimension-type
   * @secure
   */
  getDimensionType = (params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListOptionVO>({
      url: `/enum/dimension-type`,
      method: "GET",
      ...params,
    });

  /**
   * 获取指标统计周期类型列表
   *
   * @tags 枚举controller
   * @request GET: /enum/getCountType
   * @secure
   */
  getGetCountType = (params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListOptionVO>({
      url: `/enum/getCountType`,
      method: "GET",
      ...params,
    });

  /**
   * 获取统计单位列表
   *
   * @tags 枚举controller
   * @request GET: /enum/getCountUnitType
   * @secure
   */
  getGetCountUnitType = (params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListOptionVO>({
      url: `/enum/getCountUnitType`,
      method: "GET",
      ...params,
    });

  /**
   * 获取表字段类型列表
   *
   * @tags 枚举controller
   * @request GET: /enum/getTableColumnType
   * @secure
   */
  getGetTableColumnType = (params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListOptionVO>({
      url: `/enum/getTableColumnType`,
      method: "GET",
      ...params,
    });

  /**
   * 获取表类型列表
   *
   * @tags 枚举controller
   * @request GET: /enum/getTableType
   * @secure
   */
  getGetTableType = (params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListOptionVO>({
      url: `/enum/getTableType`,
      method: "GET",
      ...params,
    });

  /**
   * 获取且或枚举
   *
   * @tags 枚举controller
   * @request GET: /enum/logic-operator-enum
   * @secure
   */
  getLogicOperatorEnum = (params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListOptionVO>({
      url: `/enum/logic-operator-enum`,
      method: "GET",
      ...params,
    });

  /**
   * 指标类型,基础|衍生
   *
   * @tags 枚举controller
   * @request GET: /enum/metrics-sub-type
   * @secure
   */
  getMetricsSubType = (params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListOptionVO>({
      url: `/enum/metrics-sub-type`,
      method: "GET",
      ...params,
    });

  /**
   * 根据指标类型查询指标枚举
   *
   * @tags 枚举controller
   * @request GET: /enum/metrics/{type}
   * @secure
   */
  getMetricsByType = ({ type }: { type: string } | GetMetricsByType_, params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListOptionVO>({
      url: `/enum/metrics/${type}`,
      method: "GET",
      ...params,
    });

  /**
   * 根据指标类型查询状态枚举
   *
   * @tags 枚举controller
   * @request GET: /enum/metricsReviewStatus/{type}
   * @secure
   */
  getMetricsReviewStatusByType = (
    { type }: { type: string } | GetMetricsReviewStatusByType_,
    params: AxiosRequestConfig = {},
  ) =>
    http.request<defs.ResponseEntityListOptionVO>({
      url: `/enum/metricsReviewStatus/${type}`,
      method: "GET",
      ...params,
    });

  /**
   * 获取取数任务周期类型
   *
   * @tags 枚举controller
   * @request GET: /enum/month-bme
   * @secure
   */
  getMonthBme = (params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListOptionVO>({
      url: `/enum/month-bme`,
      method: "GET",
      ...params,
    });

  /**
   * 场景状态
   *
   * @tags 枚举controller
   * @request GET: /enum/scene-status-type
   * @secure
   */
  getSceneStatusType = (params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListOptionVO>({
      url: `/enum/scene-status-type`,
      method: "GET",
      ...params,
    });

  /**
   * 场景取数统计粒度
   *
   * @tags 枚举controller
   * @request GET: /enum/scene-timeperiod-type
   * @secure
   */
  getSceneTimeperiodType = (params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListOptionVO>({
      url: `/enum/scene-timeperiod-type`,
      method: "GET",
      ...params,
    });

  /**
   * 获取取数任务周期类型
   *
   * @tags 枚举controller
   * @request GET: /enum/task-cycle-type
   * @secure
   */
  getTaskCycleType = (params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListOptionVO>({
      url: `/enum/task-cycle-type`,
      method: "GET",
      ...params,
    });

  /**
   * 获取取数任务状态
   *
   * @tags 枚举controller
   * @request GET: /enum/task-status
   * @secure
   */
  getTaskStatus = (params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListOptionVO>({
      url: `/enum/task-status`,
      method: "GET",
      ...params,
    });

  /**
   * 获取取数任务周期类型
   *
   * @tags 枚举controller
   * @request GET: /enum/week-day
   * @secure
   */
  getWeekDay = (params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListOptionVO>({
      url: `/enum/week-day`,
      method: "GET",
      ...params,
    });
}

export default new EnumBao();
